<%@ page import="com.pension.model.dto.Member"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link href="/pension/styles/header/header.css" rel="stylesheet" />
</head>

<body>
<div id="first">
  <div align="center" id="image">
  		<img src="/pension/image/header/left.jpg" width="50" height="150">
  	<a href="/pension/home.action">
  		
  		<img src="/pension/image/header/head.jpg" width="230" height="150">
  		
  	</a>
  		<img src="/pension/image/header/right.jpg" width="50" height="150">
  </div>
  <div id="loginmenu">
    <div align="right" id="login">
    	<% Member member = (Member)session.getAttribute("loginuser"); %>
        <% if (session.getAttribute("loginuser") == null) { //로그인 하지 않은 경우 %>
        <a href="/pension/account/loginform.action">로그인</a>
        <a href="/pension/member/registerform.action">회원등록</a>
        <% } else { %>
        <%= member.getMemberId() %>님 환영합니다
        <a href="/pension/account/logout.action">로그아웃</a>
        <% } %>
	</div>
  </div>
  <div id="menu">
    <div align="left" id="menuinfo">
    	<ul>
	        <li><a href="/pension/member/pension.action">Information</a></li>
			<li><a href="/pension/room/list.action">Room's</a></li>
			<li><a href="/pension/calendar/calendars.action">Reservation</a></li>
			<li><a href="/pension/board/list.action">Board</a></li>
			<li><a href="/pension/board/enjoy.action">Enjoy</a></li>
        </ul>
    </div>
    <div align="right" id="logininfo">
    	<ul>
	        <% if (session.getAttribute("loginuser") != null) { %>
	        <% if (member.getUserType().equals("admin")) { %>
	        <li><a href="/pension/member/adminsetting.action">관리자</a></li>
	        <% } else if ( member.getUserType().equals("user")) { %>
	        <li><a href="#">예약확인</a></li>
	        <% } else {} %>
	        <li><a href="/pension/member/view.action?memberid=<%= member.getMemberId() %>">정보수정</a></li>
	        <% } %>
        </ul>
    </div>
  </div>
</div>
</body>
</html>